#ifndef UNIVERSAL_H
#define UNIVERSAL_H

#include "Kernel/Base/SharedData.h"

class Universal
{
public:
    // 输出文本
    static void OutputTxt(const char *text, bool line = true);

    // 输出布尔值
    static void OutputBool(int value, const char *pre_txt = "", const char *post_txt = "", bool line = true);

    // 输出整数
    static void OutputDec(int64 value, const char *pre_text = "", const char *post_text = "", bool line = true);

    // 输出浮点数
    static void OutputFloat(double value, const char *pre_text = "", const char *post_text = "", bool line = true);

    // 输出十六进制，保留两位
    static void OutputHex02(byte value, const char *pre_txt = "", const char *post_txt = "", bool line = true);

    // 输出十六进制，保留四位
    static void OutputHex04(ushort value, const char *pre_txt = "", const char *post_txt = "", bool line = true);

    // 输出十六进制，保留八位
    static void OutputHex08(uint value, const char *pre_txt = "", const char *post_txt = "", bool line = true);

    // 输出十六进制，保留十六位
    static void OutputHex16(uint64 value, const char *pre_txt = "", const char *post_txt = "", bool line = true);

    // 输出IPv4地址
    static void OutputIpv4(uint ip, const char *pre_txt = "", const char *post_txt = "", bool line = true);

    // 输出错误信息
    static void OutputErr(KSError error, const char *func_name, const char *comment = "");
};
#endif // UNIVERSAL_H
